package com.lingx.model.impl;

import com.lingx.model.IValidator;
import com.lingx.model.annotation.FieldModelConfig;
import com.lingx.utils.Utils;

public abstract class AbstractValidator extends AbstractModel implements IValidator {
	private static final long serialVersionUID = 8668060014174526727L;

	@FieldModelConfig(sort="3",name="返回消息",inputType="string")
	private String message;
	@FieldModelConfig(sort="5",name="验证类型",inputType="string",editor="text")
	private String type;

	//@TreeNode
	//private IScript script;
	
	public AbstractValidator(String type,String name){	
		super();
		this.setCode(Utils.getRandomString(ID_LEN));
		this.setName(name);
		this.message=DEFAULT_MESSAGE;
		this.type=type;
		this.setModelType("Validator");
	}

	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

}
